The present invention relates generally to a computer system including a given microprocessor specifically designed to operate in a virtual operating mode that allows a software program previously written for an earlier designed single program microprocessor to execute in a protected, paged, multi-tasking environment under a particularly designed host operating software program. The present invention relates more particularly to an improvement in the way in which the given microprocessor and its host operating software program handle software interrupt instructions (INTn instructions) using emulation software forming part of the host program in order to emulate the way in which those instructions would have been executed by the earlier microprocessor.
In the discussion immediately above, reference was made to a given microprocessor, to a previously written software program, to an earlier designed single program microprocessor, and to a particularly designed host operating software program. In the actual practice of the present invention, the given microprocessor specifically refers to an improvement to Intel Corporation""s 80386 and 80486(trademark) microprocessor, hereinafter merely referred to as the 386 microprocessor since the invention is equally applicable to both. The earlier designed single program microprocessor refers to Intel Corporation""s earlier designed single program 8086 microprocessor. The previously written software program refers to any of a number of different programs including specifically DOS programs that were previously written for the 8086 microprocessor. Finally, the host operating software program refers to any suitable host or central control operating system such as WINDOWS(trademark) software by Microsoft or UNIX(trademark) system software by ATandT, both written specifically for the given microprocessor so that the latter can operate in the virtual operating mode described above. While the present invention will be described hereinafter in relation to the Intel 386 (and 486(trademark)) and 8086 microprocessors, the previously written DOS programs, and a WINDOWS or UNIX operating system, it is to be understood that the present invention is not limited to those particular microprocessors, to those previously written software programs, or to those particular central operating systems. With that understanding in mind, a brief history of the 8086 and the 386 microprocessors will immediately follow. A more detailed discussion of those microprocessors as they relate specifically to the present invention will be provided in the
It can be stated, without reservation, that Intel Corporation""s earlier 8086 microprocessor was so highly successful that there were many software programs written for it. However, given that this microprocessor was to be the first of a series of subsequently improved microprocessors, it did have its limitations. One in particular, although it was not necessarily considered a limitation at the time, was the inability of the microprocessor to act on more than one software program at a time. This, of course, meant that the program itself did not have to execute in a protected, paged, multi-tasking environment. However, as the technology evolved, Intel Corporation eventually developed its 386 microprocessor which, as stated previously, is capable of running a number of programs using a more sophisticated central operating system such as WINDOWS or UNIX. At the same time, the 386 microprocessor was designed to operate in a virtual 8086 operating mode that allowed multiple software programs previously written for the earlier 8086 microprocessor to be used and specifically to execute in a protected, paged, multi-tasking environment under the more sophisticated central operating system, even though those earlier software programs were not intended to execute in that manner. There were just too many earlier programs to allow them to become obsolete. Therefore, whenever changes are made to successors of the 8086 microprocessor, compatibility with earlier 8086 software is always a consideration.
While compatibility between Intel""s present microprocessors and the earlier written software is, indeed, important, there are instances in which this objective compromises certain other operational aspects of the overall computer system. Such is the case in the execution of software interrupt instructions (INTn instructions). As will be discussed in more detail hereinafter, the present 386 microprocessor is designed to execute all INTn instructions using emulation software forming part of the host program in order to emulate the way in which these instructions would have executed by the earlier 8086 microprocessor. While the number of executions of these particular instructions is a relatively small percentage of the total instructions executed by means of emulation, they account for a relatively large amount of execution time. One particular solution to this problem which has been proposed heretofore is to allow all of the INTn instructions to be executed by the software program itself in conjunction with the microprocessor and its host operating program without using the emulation software, that is, without trapping the INTn instructions in the host operating program""s emulation software or emulator as it may be called. Applicants have found that this previous approach does save computing time generally (for the whole system) and emulation time in particular where the particular INTn instruction is simple, for example asking for the time, or even somewhat more complex, for example printing a character. However, Applicants have also discovered that for the more highly complex INTn instructions, for example reading a file, it is more efficient to allow those particular instructions to be trapped in and executed by the emulation software.
In view of the foregoing, it is a primary object of the present invention to actually reduce the time required to execute INTn instructions by a computer system of the type described above.
As will be seen hereinafter, a computer system is disclosed herein including a given microprocessor, for example the 386 microprocessor, which is specifically designed to operate in a virtual operating mode that allows a software program, for example a DOS program previously written for an earlier designed single program microprocessor, for example the 8086 microprocessor, to execute in a protected, paged, multi-tasking environment under a particularly designed host operating software program, for example WINDOWS or UNIX. This system also includes means forming part of the given microprocessor and the host operating software program for executing INTn instructions using emulation software forming part of the host program in order to emulate the way in which the instructions would have been executed by the earlier microprocessor.
In order to reduce the time it takes for the computer system generally and the emulation software in particular to execute INTn instructions during the virtual operating mode of the computer system, means are provided for causing certain ones of the INTn instructions to be executed by means of the emulation software while allowing certain others of the INTn instructions to be executed by means of the previously written program, but not by means of the emulation software. In the specific embodiment disclosed herein, the overall system is provided with a bit map including a series of bits, one for each of the INTn instructions. Each of these bits is placed in either an emulating first state or a non-emulating second state. Means are also provided for causing all of the INTn instructions associated with the emulating first state of the bit map to be executed by means of the emulation software while allowing all of the INTn instructions associated with the non-emulating second state of the bit map to be trapped in and execute by the previously written program in cooperation with the given software in the host operating software program, but not by means of the emulation software. In other words, the present invention provides for taking some but not all of the INTn instructions out of the hands of the emulator. In that way, those INTn instructions to be emulated and those that are not to be emulated can be preselected depending upon the complexity of the particular instructions so as to minimize the overall time it takes to execute all of the instructions. This is to be contrasted first with the computer system including the existing 386 microprocessor which executes all INTn instructions by means of emulation and second with the previously proposed modification to the 386 system which executes none of the INTn instructions by means of emulation. The present invention provides the best of both of these approaches as regards the execution of INTn instructions.